package com.quick.develop.flowable.enums;

import com.quick.develop.framework.common.exception.ErrorCode;

public interface BpmErrorCodeConstants {
    // ==========  通用流程处理 模块 1-009-000-000 ==========
    ErrorCode HIGHLIGHT_IMG_ERROR = new ErrorCode(1009000002, "获取高亮流程图异常");

    // ========== 流程模型 1-009-002-000 ==========
    ErrorCode MODEL_KEY_EXISTS = new ErrorCode(1009002000, "已经存在流程标识为【{}】的流程");
    ErrorCode MODEL_NOT_EXISTS = new ErrorCode(1009002001, "流程模型不存在");
    ErrorCode MODEL_KEY_VALID = new ErrorCode(1009002002, "流程标识格式不正确，需要以字母或下划线开头，后接任意字母、数字、中划线、下划线、句点！");
    ErrorCode MODEL_DEPLOY_FAIL_FORM_NOT_CONFIG = new ErrorCode(1009002003, "部署流程失败，原因：流程表单未配置，请点击【修改流程】按钮进行配置");
    ErrorCode MODEL_DEPLOY_FAIL_TASK_ASSIGN_RULE_NOT_CONFIG = new ErrorCode(1009002004, "部署流程失败，" +
            "原因：用户任务({})未配置分配规则，请点击【修改流程】按钮进行配置");
    ErrorCode MODEL_DEPLOY_FAIL_TASK_INFO_EQUALS = new ErrorCode(1009002005, "流程定义部署失败，原因：信息未发生变化");
    ErrorCode MODEL_IS_ERROR = new ErrorCode(1009002006, "流程模型有误，请检查流程图");
    ErrorCode MODEL_FIRST_NODE_NOT_USER_TASK = new ErrorCode(1009002007, "开始节点的下一个节点必须是用户任务，有且只有一个");

    // ========== 流程定义 1-009-003-000 ==========
    ErrorCode PROCESS_DEFINITION_KEY_NOT_MATCH = new ErrorCode(1009003000, "流程定义的标识期望是({})，当前是({})，请修改 BPMN 流程图");
    ErrorCode PROCESS_DEFINITION_NAME_NOT_MATCH = new ErrorCode(1009003001, "流程定义的名字期望是({})，当前是({})，请修改 BPMN 流程图");
    ErrorCode PROCESS_DEFINITION_NOT_EXISTS = new ErrorCode(1009003002, "流程定义不存在");
    ErrorCode PROCESS_DEFINITION_IS_SUSPENDED = new ErrorCode(1009003003, "流程定义处于挂起状态");
    ErrorCode PROCESS_DEFINITION_BPMN_MODEL_NOT_EXISTS = new ErrorCode(1009003004, "流程定义的模型不存在");
    ErrorCode PROCESS_DEFINITION_ID_IS_EMPTY = new ErrorCode(1009003005, "流程定义ID不能为空");
    ErrorCode PROCESS_DEFINITION_KEY_IS_EMPTY = new ErrorCode(1009003006, "流程定义KEY不能为空");
    ErrorCode PROCESS_DEFINITION_NOT_EXISTS_OR_ACTIVITY = new ErrorCode(1009003007, "流程标识为【{}】的流程未激活，请先部署、激活");


    // ========== 流程实例 1-009-004-000 ==========
    ErrorCode PROCESS_INSTANCE_NOT_EXISTS = new ErrorCode(1009004000, "流程实例不存在");
    ErrorCode PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS = new ErrorCode(1009004001, "流程终止失败，流程不处于运行中");
    ErrorCode PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF = new ErrorCode(1009004002, "流程终止失败，该流程不是你发起的");
    ErrorCode PROCESS_INSTANCE_ID_EMPTY = new ErrorCode(1009004003, "流程实例ID为空");
    ErrorCode PROCESS_BUSINESS_KEY_EMPTY = new ErrorCode(1009004004, "业务ID为空");
    ErrorCode PROCESS_IS_FINISHED = new ErrorCode(1009004005, "流程已完成");
    ErrorCode PROCESS_DELETE_FAIL_MAIN_INSTANCE_NOT_EXISTS = new ErrorCode(1009004006, "流程删除失败，未找到主流程");
    ErrorCode PROCESS_INSTANCE_CANCEL_FAIL_CALL_ACTIVITY_UNFINISHED = new ErrorCode(1009004007, "流程终止失败，还有节点处于子流程中，无法终止");

    // ========== 流程任务 1-009-005-000 ==========
    ErrorCode TASK_HANDLER_FAIL_NOT_EXISTS = new ErrorCode(1009005000, "任务处理失败，原因：该任务不存在");
    ErrorCode TASK_HANDLER_FAIL_ASSIGN_NOT_SELF = new ErrorCode(1009005001, "任务处理失败，原因：该任务的审批人不是你");
    ErrorCode TASK_IS_SUSPENDED = new ErrorCode(1009005002,"任务处于挂起状态");
    ErrorCode TASK_SOURCE_IS_EMPTY_KEYS = new ErrorCode(1009005003, "源节点KEY不能为空");
    ErrorCode TASK_IS_EMPTY_ID = new ErrorCode(1009005004, "任务ID不能为空");
    ErrorCode TASK_IS_EMPTY_CANDIDATE_USER = new ErrorCode(1009005005, "候选人为空");
    ErrorCode TASK_IS_EMPTY_CANDIDATE_GROUP = new ErrorCode(1009005006, "候选组为空");
    ErrorCode TASK_IS_NOT_EXISTS = new ErrorCode(1009005007, "任务为空，无法完成第一个节点");
    ErrorCode TASK_WITHDRAW_FAIL_PROCESS_FINISHED = new ErrorCode(1009005008, "任务无法撤回，流程已完成");
    ErrorCode TASK_WITHDRAW_FAIL_CALL_ACTIVITY_UNFINISHED = new ErrorCode(1009005009, "任务无法撤回，当前运行节点处于子流程中");
    ErrorCode TASK_WITHDRAW_FAIL_TASK_NOT_EXISTS = new ErrorCode(1009005010, "任务无法撤回，历史任务不存在");
    ErrorCode TASK_WITHDRAW_FAIL_TASK_IS_MULTI = new ErrorCode(1009005011, "会签节点任务无法撤回");
    ErrorCode TASK_WITHDRAW_FAIL_TASK_IS_CURRENT = new ErrorCode(1009005012, "任务无法撤回，任务正处于撤回的节点");
    ErrorCode TASK_WITHDRAW_FAIL_EXECUTION_IS_EMPTY = new ErrorCode(1009005013, "任务无法撤回，无法找到执行任务");
    ErrorCode TASK_WITHDRAW_FAIL_TASK_IS_APPROVE = new ErrorCode(1009005014, "任务已审批，无法撤回");
    ErrorCode TASK_EXECUTION_IS_EMPTY = new ErrorCode(1009005015, "执行任务为空");
    ErrorCode TASK_ALREADY_CLAIMED = new ErrorCode(1009005016, "该任务已被别人领取，您无法处理");
    ErrorCode TASK_ALREADY_DELEGATE = new ErrorCode(1009005017, "该任务已被委派，无法再次委派");
    

    // ========== 流程任务分配规则 1-009-006-000 ==========
    ErrorCode TASK_ASSIGN_RULE_EXISTS = new ErrorCode(1009006000, "流程({}) 的任务({}) 已经存在分配规则");
    ErrorCode TASK_ASSIGN_RULE_NOT_EXISTS = new ErrorCode(1009006001, "流程任务分配规则不存在");
    ErrorCode TASK_UPDATE_FAIL_NOT_MODEL = new ErrorCode(1009006002, "只有流程模型的任务分配规则，才允许被修改");
    ErrorCode TASK_CREATE_FAIL_NO_CANDIDATE_USER = new ErrorCode(1009006003, "操作失败，原因：找不到任务的审批人！");
    ErrorCode TASK_ASSIGN_SCRIPT_NOT_EXISTS = new ErrorCode(1009006004, "操作失败，原因：任务分配脚本({}) 不存在");

    // ========== 流程委托 1-009-007-000 ==========
    ErrorCode PROCESS_ENTRUST_IS_EXISTS = new ErrorCode(1009007000, "流程标识：{}；委托已存在，请勿重复添加");

    // ========== 动态表单模块 1-009-010-000 ==========

    // ========== 用户、组模块 1-009-011-000 ==========
    ErrorCode USER_GROUP_NOT_EXISTS = new ErrorCode(1009011000, "用户组不存在");
    ErrorCode USER_GROUP_IS_EXISTS = new ErrorCode(1009011001, "用户组已存在");
    ErrorCode USER_GROUP_IS_DISABLE = new ErrorCode(1009011002, "名字为【{}】的用户组已被禁用");
    ErrorCode USER_BY_ROLE_ERROR = new ErrorCode(1009011003, "获取角色对应人员失败：{}");
    ErrorCode USER_CHECK_DEPT_ERROR = new ErrorCode(1009011004, "判断部门信息失败：{}");
    ErrorCode USER_GET_LEADER_ERROR = new ErrorCode(1009011005, "获取公司领导信息失败：{}");
    ErrorCode USER_NOT_SUPER_ADMIN_ERROR = new ErrorCode(1009011006, "你不是超级管理员无法操作！！！");
    
    // ========== 监听模块 1-009-012-000 ==========
//    ErrorCode LISTENER_PROCESS_CREATED = 
    
    // ========== 定时任务模块 1-009-013-000 ==========
    ErrorCode VAR_DELETE_ERROR = new ErrorCode(1009013000, "删除流程参数失败，流程实例ID：{}");
    ErrorCode AUTO_COMPLETE_READ_ERROR = new ErrorCode(1009013001, "【{}】：自动已阅异常：{}");

}
